package org.sluggard.tangela.core;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

public class EditMenu extends JMenu {

	public EditMenu() {
		super();
		initComponents();
	}

	private void initComponents() {
		setText("Edit");
		submit = new javax.swing.JMenuItem();
		submit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
				java.awt.event.KeyEvent.VK_ENTER,
				java.awt.event.InputEvent.CTRL_MASK));
		submit.setText("Submit");
		submit.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				Container.getMainSelf().getSubmitButton().doClick();
			}
		});
		add(submit);
	}

	private JMenuItem submit;
}
